package lib.Base;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Conversation implements Serializable {
	/** 
	 * Class to hold a conversation between two users.
	 * A conversation is a ArrayList of Message objects.
	 */
	
	private static final long serialVersionUID = 1L;
	private List<Message> msgList;

	public Conversation(String userId, String message) {
		this.msgList = new ArrayList<Message>();
		msgList.add(new Message(516503, userId, message));
	}

	public void addMsgObj(Message obj) {
		msgList.add(obj);
	}

	public Message getLastMsgObj() {
		return msgList.get(msgList.size() - 1);
	}
}